import React, { Component } from 'react';
import Home from './views/layout/index';
import Login from './views/login/index';
import CityList from './views/city/index';
import Test from './views/Map';

import {
  BrowserRouter as Router,
  Route,
  Link,
  Redirect,
  Switch
} from 'react-router-dom';
function NoFound() {
  return <div>404</div>;
}
export default class App extends Component {
  render() {
    return (
      <Router>
        <Switch>
          <Redirect exact from="/" to="/home" />
          <Route path="/login" component={Login} />
          <Route path="/home" component={Home} />
          <Route path="/map" component={Test} />

          <Route path="/cityList" component={CityList} />
          <Route component={NoFound} />
        </Switch>
      </Router>
    );
  }
}
